def decorator(fn):
    def inner(*args, **kwargs):
        print('前面添加功能')
        result = fn(*args, **kwargs)
        print('后面添加功能')
        return result

    return inner


@decorator
def add1(num1, num2, num3):
    return num1 + num2 +num3

@decorator
def add2(num1, num2, num3, num4, num5):
    return num1 + num2 + num3 + num4 + num5


if __name__ == '__main__':
    print(add1(1, 2, 3))
    print(add2(1, 2, 3, 4, 5))
